package com.yubest.device.util;

/**
 * @Author hweiyu
 * @Description
 * @Date 2022/6/16 11:38
 */
public class DeviceUtil {

    public static DeviceInfo getDeviceInfo() throws Exception {
        String os = System.getProperty("os.name").toLowerCase();
        Device device;
        if (os.startsWith("win")) {
            device = new WinDevice();
        } else {
            device = new LinuxDevice();
        }
        return device.getDeviceInfo();
    }
}
